The invention relates to a method for determining the wood/bark ratio from a flow of wood material, in which the flow is illuminated, scanned along a transverse line with a video camera, the line image corresponding to the line is digitalized into pixels each of which comprise intensity information, the intensity classes corresponding to the wood and the bark are determined and the pixels belonging to each class are calculated with the help of their intensity information, and the wood/bark ratio is determined by the number of pixels situated in the different intensity classes.
It is important to know the content of bark and wood in order to be able to peel the logs in an optimal way. By regulating the peeling process in such a way that the content of bark reaches the desired limiting values, it is on the one hand possible to avoid overpeeling and, on the other hand, possible to monitor the fulfilment of the quality requirements relating to the content of bark.
An on-line method for determining the wood/bark ratio from a flow of wood material has been presented in the publication of the application 831320 concerning a European Patent. In the said method the flow of wood material is scanned with a CCD line camera that is fixed in the direction transverse to the flow, in which there are 30-300 pixels/cm each of which measures the gray scale of the corresponding image field. The pixels are divided into main groups and subgroups are chosen from these main groups in which there exist at the most a chosen number (1-20) of adjacent pixels, the gray scale of which exceeds a set limit. The subgroups are filtered from the main groups and the average brightness is calculated for each completed group. The wood and the bark and possibly the background have been set their own classes of brightness, according to which each group is classed into its own class of brightness. The wood/bark ratio in the flow of wood is calculated on the basis of the pixels situated in each class. The method according to the publication is not very suitable for determining a wood chip flow that contains the bark of birches. The wood material of birches and the gray scales of the surface side of their bark are so close to each other that it is especially difficult to separate one from the other.
The Finnish patent 95511 presents a method for determining the differently colored surface areas from a flow of material, which is set to move forward on a transparent conveyor. Backgrounds in accordance with the partial colors are used in the many consecutive chambers, with which backgrounds each color is filtered in its turn. The color of the bark of trees differs somewhat, and the method is not well suited to determining the wood/bark ratio. Attention has not been paid to the effect of the layer height (height of the surface) to the survey results. The pieces of wood chips do not move on the conveyor as separate pieces but often as layers as thick as 20-50 cm. Furthermore, the wood chip and bark conveyors are not transparent.
Publication W097/37780 presents a color separator, in which several images are taken with the help of an RGB color camera of the subjects to be classified and the images are turned into color shade and color saturation values, on the basis of which the classification is carried out. Scanning technology of 24 bit dynamics (3*8 bits) is utilized in the method, whereby in the color space of a specific yellow-brown area the color separating ability is not of a sufficiently good level for the color separation of wood and bark. In addition to this, 8 bit dynamics/channel has the problem that the sensor is easily saturated if an attempt has been made efficiently to take advantage of all the 256 gray scale values.
U.S. Pat. No. 5,887,073 presents a color separator in which pixels of set color are separated from a 3xc3x978 bit RGB image into their own image. As above, there is here a low dynamics. In addition to this, intensity neutral color and color saturation color coordinates are used, but not at all any intensity information and the color response is not stabilized.
The invention relates to a method for determining bark and wood content. It is important to know the bark and wood content, so that the peeling of logs may be carried out in an optimal way. At the present time, the determining of the quality of wood chips is almost solely based on the taking of random samples, taken in different ways, and on the results achieved by the analysis of these samples. It is difficult to take a representative sample from a batch of wood chips. Furthermore, the taking of samples and especially the analyses are laborious and time consuming. It is not in practice possible to regulate the process with the help of the measurements, and the measurements only have meaning as a means of control. Continuously functional indicators based on gray scale CCD cameras are also available, but with them it is possible accurately to measure mainly the wood content on a bark conveyor. The determining of bark content on a wood chip conveyor is a much more demanding task, since the bark content to be measured is often 0.1-1.5%. The darkness of the bark of many kinds of wood makes the optical observation more difficult.
The object of this invention is to achieve an improved method for determining the wood/bark ratio in a flow of wood material. The characteristic features of the method according to the invention are presented in the adjoining patent claims. The changing of the black and white camera used in the method according to the EP-publication to a 24 bit color camera of the same level does not considerably improve the ability to separate, because it is difficult to recognize the color of the bark in a reliable manner and the color responses are not stable.
It is possible to improve the accuracy of the measurements to a considerable extent with the help of color information, when at the same time the dynamics (per channel) are improved to the level of at least 10 bits, most profitably 12 bits and the color responses are stabilized. It is then also essential to make the classification at least three-dimensionally. In order to achieve the best accuracy of the measurements, the color response needs to be stabilized.
The color stimulus "PHgr"("Ugr") is some combination of the effect spectrum (S("Ugr")) and, depending on the subject, of the transmission (T("Ugr")), reflection (R("Ugr")) or radiance spectrum (r("Ugr")). When examining the wood or bark content by a CCD color camera technique it is a question of the reflection spectrum (R("Ugr")) of the surface. The values R, G and B of the color components are obtained as the scalar product of the color stimulus "PHgr"("Ugr") and the sensitivity curves r("Ugr"), g("Ugr") and b("Ugr") of the red, green and blue components of the camera.       [                            R                                      G                                      B                      ]    =      ∫                            Φ          ⁡                      (            λ            )                          ⁡                  [                                                                      r                  ⁡                                      (                    λ                    )                                                                                                                        g                  ⁡                                      (                    λ                    )                                                                                                                        b                  ⁡                                      (                    λ                    )                                                                                ]                    ⁢              ⅆ        λ            
The values (R, G and B) of the color components disclose the internal relations of the primary colors (blue, green and red) in the color mixture. In the method presented here the effect of the subject""s change of brightness is minimized by calculating the relative shares of the color components r, g and b (r=R/(R+G+B), g=G/(R+G+B) and b=B/(R+G+B), whereby r, g and b are not dependant on the extent of the radiation power if the form of the spectrum of the source of light stays the same. This requirement is in practice fulfilled when the lights are not regulated in ways that would affect the color temperature of the source of light (no thyristor regulators are used) and the sources of light are allowed to stabilize for a time of sufficient length before starting the measurements (about 30 min).
The lighting must be non-flashing and its changes need to be compensated for. Non-flashing lighting may also be produced by synchronizing the scanning to the frequency of the lighting.
By taking advantage of the line camera technique, an even lighting of the subject may be achieved considerably more easily and more evenly than with the matrix camera technique. If the size of the scanned area is physically e.g. 600 mmxc3x97600 mm, when using a matrix camera it is necessary to illuminate the whole 600 mmxc3x97600 mm area evenly from the center of the area as well as from its edges. In the line camera technique it is enough evenly to illuminate a 600 mm wide area in the direction transverse to the conveyor but only about 1-2 mm in length. With the line camera, a chosen number of line images is taken one after the other from the moving flow. The consecutive lines are connected to one separate image usually already by the image card attached to the camera and an image matrix is achieved for further processing. Different image processing operations are performed on the image matrix. The most essential information from the point of view of the invention is contained in each separate line image. In order to achieve statistical reliability, a vast number of line images is included in the calculation.
In the method according to the invention the correction of the intensity has been achieved in two different ways: first, an rgb-image is calculated from the RGB image and, secondly, the intensity information of the chosen color channel (R or G) that corresponds well to the overall intensity is transformed with the help of a measuring of the height of the surface to intensity information that is independent of the layer height.